package org.cyz.tools.common.util;

import javafx.scene.Node;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;

/**
 * @author abccy
 * @title: ImageUtil
 * @projectName RedisGUI
 * @description: TODO
 * @date 2020-8-1716:31
 */
public class ImageUtil {
    /**
     * 获取icon
     *
     * @param iconName 图标名称
     * @return
     */
    public static Node getIcon(String iconName) {
        return new ImageView(new Image(ImageUtil.class.getResourceAsStream("/images/" + iconName + ".png")));
    }

    public static Image getStartIcon(String iconName){
        return  new Image(ImageUtil.class.getResourceAsStream("/images/" + iconName + ".png"));
    }



}
